home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 2010 April
/
PCWorld0410.iso
/
pluginy Firefox
/
1122
/
1122.xpi
/
chrome
/
tabmixplus.jar
/
content
/
tabmixplus
/
pref
/
pref-appearance.js
< prev
next >
Wrap
Text File
|
2009-09-11
|
1KB
|
39 lines
var TMPstyles = {
_prefsSvc: null,
get prefsSvc() {
if (!this._prefsSvc) {
this._prefsSvc = Components.classes["@mozilla.org/preferences-service;1"].
getService(Components.interfaces.nsIPrefBranch2);
}
return this._prefsSvc;
},
init: function () {
try {
var index = this.prefsSvc.getIntPref("extensions.tabmix.appearance_tab");
}
catch (ex) { index = 0; }
document.getElementById("stylestabs").selectedIndex = index;
/* Chromifox theme force button height to 25px */
var skin = this.prefsSvc.getCharPref("general.skins.selectedSkin");
if (skin == "cfxec")
document.getElementById("AppearanceTabBox").setAttribute("chromifox", true);
},
save: function () {
this.prefsSvc.setIntPref("extensions.tabmix.appearance_tab", document.getElementById("stylestabs").selectedIndex);
// store the pref immediately
Components.classes["@mozilla.org/preferences-service;1"].
getService(Components.interfaces.nsIPrefService).savePrefFile(null);
},
cancel: function () {
Array.forEach(["currentTab", "unreadTab", "otherTab", "progressMeter"], function(aID) {
document.getElementById(aID)._ondialogcancel();
});
this.save();
}
}